﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using MicropleSoft.WmsServiceLibrary.BaseDataService;
using MicropleSoft.WmsServiceLibrary.BusinessInterfaces;
using MicropleSoft.WmsServiceLibrary.Domain;
using MicropleSoft.WmsServiceLibrary.Unity;

namespace MicropleSoft.Web
{
    public partial class ServiceFacade
    {
        #region Implementation of IServiceFacade

        public void SaveItemClassAndItemTemplates(ItemClass itemClass, List<ItemTemplate> itemTemplates)
        {
            var tableSchemaModifier = ContainerFactory.GetObjectFromUnityContainer<ITableSchemaModifier>();
            tableSchemaModifier.SaveItemClassAndItemTemplates(itemClass,itemTemplates);
        }

        public DateTime GetCurrentDateTime()
        {
            return DateTime.Now;
        }

        public BaseDataWrap GetBaseData(string dataSourceKey, string whId, string condition)
        {
            var baseDataWrapBuilder = ContainerFactory.GetObjectFromUnityContainer<IBaseDataWrapBuilder>();
            return baseDataWrapBuilder.Build(dataSourceKey, whId, condition);
        }
        #endregion
    }
}